import { createRequest } from '/@/api/service';
const module = 'ib/flowpath/v1/FlowpathWarehouse/';
/**
 * 查询物资类型信息
 */
function TYPE_LIST(
  data: FlowpathWarehouse.WarehouseTypeListReq,
  header: object = {},
): Promise<FlowpathWarehouse.WarehouseTypeListResp> {
  return createRequest(`${process.env.APP_API_URL}${module}typeList`, data, header, 'POST');
}

/**
 * 获取物资库存信息
 */
function TOOL_INFO(
  data: FlowpathWarehouse.WarehouseToolInfoReq,
  header: object = {},
): Promise<FlowpathWarehouse.WarehouseToolInfoResp> {
  return createRequest(`${process.env.APP_API_URL}${module}toolInfo`, data, header, 'POST');
}

/**
 * 新增库房领用流程审批
 */
function ADD_WAREHOUSE_APPLY(
  data: FlowpathWarehouse.AddWarehouseApplyReq,
  header: object = {},
): Promise<FlowpathWarehouse.AddWarehouseApplyResp> {
  return createRequest(
    `${process.env.APP_API_URL}${module}addWarehouseApply`,
    data,
    header,
    'POST',
  );
}

export { TYPE_LIST, TOOL_INFO, ADD_WAREHOUSE_APPLY };
